package com.zhanghaijun.createCode.mail;

import com.zhanghaijun.createCode.mail.util.MailSenderInfo;
import com.zhanghaijun.createCode.mail.util.SimpleMailSender;
import org.jsoup.Connection;
import org.jsoup.Jsoup;

/**
 * Created by zhanghaijun on 15/7/2.
 */
public class MailTest {

    public static void main(String[] args){
        //这个类主要是设置邮件
        MailSenderInfo mailInfo = new MailSenderInfo();
        mailInfo.setMailServerHost("smtp.163.com");
        mailInfo.setMailServerPort("25");
        mailInfo.setValidate(true);
        mailInfo.setUserName("zhanghaijun8755018@163.com");
        mailInfo.setPassword("13675888109");//您的邮箱密码
        mailInfo.setFromAddress("zhanghaijun8755018@163.com");
        mailInfo.setToAddress("295876809@qq.com");
        mailInfo.setSubject("设置邮箱标题");
        mailInfo.setContent("<div>hello<br/><b>hello</b><br/>hello<br/>hello<br/></div>");
        //这个类主要来发送邮件
        SimpleMailSender sms = new SimpleMailSender();
        //sms.sendTextMail(mailInfo);//发送文体格式
        sms.sendHtmlMail(mailInfo);//发送html格式
    }




}
